package com.lzy.config;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import com.lzy.properties.SwaggerProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 *
 * Swagger2的接口配置
 *
 * @author lyw
 * @Date 2023/2/20-下午5:24
 */

@Configuration
@EnableSwagger2
@EnableKnife4j
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfig extends BaseSwaggerConfig {


  @Override
  public SwaggerProperties swaggerProperties() {
    return SwaggerProperties.builder()
            //设置Swagger扫描的Controller路径，只有扫描到了才会生成接口文档
            .apiBasePackage("com.lzy.controller")
            .title("LZY后台管理系统")
            .description("后台接口文档")
            .contactName("lyw")
            .version("1.0")
            .enableSecurity(true)
            .build();
  }

}
